from django.conf.urls import url
from . import views


urlpatterns =[
    # 利用正则组来提取url中的路径参数 如果给正则组起了别名，视图函数的形参名字一定要一致，顺序可以不一致
    url(r'^weather1/(?P<city>[a-z]+)/(?P<year>\d{4})$', views.weather1),

    url(r'^get_query_string/$', views.get_query_string),
    url(r'^get_form/$', views.get_form),
    url(r'^get_json/$', views.get_json),
    url(r'^get_request_head/$', views.get_request_head),


    url(r'^response_demo/$', views.response_demo),
    url(r'^json_response/$', views.json_response),
    url(r'^redirect_demo/$', views.redirect_demo, name='redirect_demo'),
    url(r'^cookie_demo/$', views.cookie_demo),
    url(r'^session_demo/$', views.session_demo)
]